﻿using LJX.SmartPark.Common.Extensions;
using LJX.SmartPark.Common.ResponseOutput;
using LJX.SmartPark.Domain.Area;
using LJX.SmartPark.Service.Repository;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace LJX.SmartPark.Service.Area.Monitor
{
    internal class MonitoringServeice :IMonitoringServeice
    {
        private readonly IRepository<Monitoring> _studentService;

        public MonitoringServeice(IRepository<Monitoring> studentService)
        {
            _studentService = studentService;
        }

        /// <summary>
        /// 显示
        /// </summary>
        /// <returns></returns>
        public async Task<Response<List<Monitoring>>> GetMonitoring()
        {
            var students = _studentService.GetListQuery();
            var result = students.MapToList<Monitoring>();
            return Response<List<Monitoring>>.Ok(result);
        }
    }
}
